1. Field of the Invention
The present invention relates to the synchronous operation of motors that are controlled by a control apparatus such as a numerical control apparatus or a robot controller.
2. Description of the Related Art
In a control apparatus such as a numerical control apparatus or a robot controller, motor control is performed on the basis of a timing signal (ITP (interpolation period) signal) generated by the internal hardware of the control apparatus at a constant frequency, and the main CPU of the control apparatus delivers the movement at each interval of the ITP signal to DSPs (digital signal processor) which control servo motors. The DSPs control the positions and speeds of the motors by distributing the commanded movement among control periods (position/speed control periods) obtained by dividing the ITP signal interval into further equal parts.
The motors move in synchronization with the ITP signal, and hence motors controlled by a single control apparatus can perform a closely synchronized operation. This is because the motors can use the same ITP signal.
However, when a large number of motors are to be controlled, the axis control slots possessed by a single control apparatus are insufficient, and in certain cases, another control apparatus must be used. In such cases, motors that are controlled by the same control apparatus are able to use the same ITP signal, as described above, and are therefore capable of a closely synchronized operation. However, ITP signals are not synchronized among motors that are controlled by different control apparatuses, and hence the motors cannot perform a synchronous operation.
In a known method for solving this problem to enable synchronous operation among motors controlled by a plurality of control apparatuses, the plurality of control apparatuses are divided into a single master unit and one or more slave units, and ITP signals are distributed to the slave units from the master unit via a serial bus connecting the master unit and slave units. Thus the ITP signals of the plurality of control apparatuses are synchronized such that the motors controlled by the plurality of control apparatuses perform a synchronous operation. In addition to the ITP signals, information required for the synchronous operation, such as the movement for each ITP interval, is transmitted and received on the serial bus. With this synchronization method, delays caused by the length of the transmission line between the master unit and the slave units and so on lead to deviations in the synchronization signal (ITP signal) generation timing, and hence a technique has been developed for correcting these deviations such that the ITP signals are generated at an identical timing (see Japanese Patent Application Laid-Open No. 4-135210).
Note that ITP signals may be transmitted and received using a dedicated cable, but information required for the synchronous operation other than the ITP signal must be transmitted and received, leading to an increase in the number of serial bus lines and a consequent increase in cost.
Furthermore, by applying this method to expansion slots connected to the same serial bus, the number of axes can be increased as long as the CPU of the control apparatus can manage. More specifically, the ITP signals of the master unit are transmitted on the serial bus to an axis control board mounted in the expansion slot, the ITP signals inputted into the axis control board are synchronized, and the movement for each ITP signal is outputted to the DSPs on the axis control board simultaneously through the serial bus.
FIG. 1 shows an outline of synchronous control of motors connected to a numerical control apparatus serving as the aforementioned master unit, to an axis control board provided in an expansion slot of the master unit, and to numerical control apparatuses serving as slave units. In FIG. 1, the serial bus between the numerical control apparatuses and expansion slot takes a cascade connection form, but may take a star form, a multidrop form, or another form.
FIG. 9 is an illustrative view showing ITP signal transmission and reception between the master unit and slave units of the control system shown in FIG. 1. When an ITP signal is generated in the master unit (FIG. 9(a)) of a control system in which the master unit and a slave unit (including the axis control board provided in the expansion slot of the master unit), constituted by numerical control apparatuses, are connected by a serial bus such that the motors controlled by the respective numerical control apparatuses can be synchronously controlled, notification of the generation of the ITP signal is transmitted automatically from the master unit to the slave unit through the serial bus (FIG. 9(b)). The transmitted notification comprises digital information indicating that an ITP signal has been generated. The slave unit receives the ITP signal (FIG. 9(c)), decodes the digital information, and generates a PRE_ITP signal, which is a signal indicating that an ITP signal has been generated in the master (FIG. 9(d)).
The PRE_ITP signal is delayed in relation to the ITP signal from the master unit, but as long as this delay is negligible, it may be used without modification as the ITP signal of the slave unit, enabling synchronous operation of the motors controlled by the master unit and slave unit. Even if a delay exists, the delay can be corrected using the method described in the above-mentioned Japanese Patent Application Laid-Open No. 4-135210.
However, if the PRE_ITP signal is used as the ITP signal of the slave unit and the ITP signal transmission timing changes due to interference with the transmission of normal data or the like, the PRE_ITP signal interval may change greatly. Furthermore, if a communication failure occurs due to noise or the like such that the ITP signal generation information does not reach the slave unit, the slave unit can issue a request for retransmission to ensure that the ITP signal is received, but as a result of the retransmission, a deviation occurs in the ITP signal timing, causing an increase in the synchronization error between the motors.
FIG. 10 is an illustrative view of this phenomenon. An ITP signal is generated in the master unit (FIG. 10(a)), and an ITP transmission signal S is transmitted automatically from the master unit to the slave unit to notify the slave unit that an ITP signal has been generated. However, due to a communication failure or the like, the ITP transmission signal S does not reach the slave unit, and when the ITP transmission signal is retransmitted (FIG. 10(b)), the retransmitted ITP transmission signal Sr is delayed. Hence, when the slave unit receives the retransmitted ITP transmission signal Sr, the PRE_ITP signal generated as a result is also delayed (FIG. 10(c)).
As a result, a deviation occurs in the timing of a DSP control period, which is a control period of the position and speed of the motors obtained by dividing the PRE_ITP signal interval into further equal parts. As shown in FIG. 10(d), due to the delay in the PRE_ITP signal caused by the delay in the retransmitted ITP transmission signal Sr, the control period immediately before generation of the PRE_ITP signal becomes a period T1 which is longer than normal. On the other hand, when the next ITP signal is generated, the ITP transmission signal S is received normally and the PRE_ITP signal is generated normally, and hence the final control period (position/speed control period) of the counter periods obtained by dividing the interval between the delayed PRE_ITP signal and the normal PRE_ITP signal becomes a period T2 which is shorter than normal.
A deviation also occurs in the ITP signal timing due to differences in the clocks installed in the master unit and slave units. A timing deviation indicates that the ITP signal interval is irregular, and since the ITP signal interval is divided further to perform motor position/speed control, the timing deviation leads to irregular position/speed control.